package gestion.horarios.model.jpa.entities;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.List;


/**
 * The persistent class for the detalleplancurricular database table.
 * 
 */
@Entity
@Table(name="detalleplancurricular")
public class DetallePlanCurricular implements Serializable {
	private static final long serialVersionUID = 1L;
	private DetallePlanCurricularPK id;
	private BigDecimal creditosCurso;
	private BigDecimal creditosPrerequisito;
	private PlanCurricular plancurricular;
	private NivelesCarrera nivelescarrera;
	private Curso curso;
	private List<DetallePrerequisitoPlanCurricular> detalleprerequisitoplancurriculars;

    public DetallePlanCurricular() {
    }


	@EmbeddedId
	public DetallePlanCurricularPK getId() {
		return this.id;
	}

	public void setId(DetallePlanCurricularPK id) {
		this.id = id;
	}
	

	@Column(nullable=false, precision=10, scale=2)
	public BigDecimal getCreditosCurso() {
		return this.creditosCurso;
	}

	public void setCreditosCurso(BigDecimal creditosCurso) {
		this.creditosCurso = creditosCurso;
	}


	@Column(precision=10, scale=2)
	public BigDecimal getCreditosPrerequisito() {
		return this.creditosPrerequisito;
	}

	public void setCreditosPrerequisito(BigDecimal creditosPrerequisito) {
		this.creditosPrerequisito = creditosPrerequisito;
	}


	//bi-directional many-to-one association to PlanCurricular
    @ManyToOne
	@JoinColumn(name="PlanCurricularId", nullable=false, insertable=false, updatable=false)
	public PlanCurricular getPlancurricular() {
		return this.plancurricular;
	}

	public void setPlancurricular(PlanCurricular plancurricular) {
		this.plancurricular = plancurricular;
	}
	

	//bi-directional many-to-one association to NivelesCarrera
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="CarreraId", referencedColumnName="CarreraId", nullable=false),
		@JoinColumn(name="NivelesCarreraId", referencedColumnName="NivelesCarreraId", nullable=false)
		})
	public NivelesCarrera getNivelescarrera() {
		return this.nivelescarrera;
	}

	public void setNivelescarrera(NivelesCarrera nivelescarrera) {
		this.nivelescarrera = nivelescarrera;
	}
	

	//bi-directional many-to-one association to Curso
    @ManyToOne
	@JoinColumn(name="CursoId", nullable=false)
	public Curso getCurso() {
		return this.curso;
	}

	public void setCurso(Curso curso) {
		this.curso = curso;
	}
	

	//bi-directional many-to-one association to DetallePrerequisitoPlanCurricular
	@OneToMany(mappedBy="detalleplancurricular")
	public List<DetallePrerequisitoPlanCurricular> getDetalleprerequisitoplancurriculars() {
		return this.detalleprerequisitoplancurriculars;
	}

	public void setDetalleprerequisitoplancurriculars(List<DetallePrerequisitoPlanCurricular> detalleprerequisitoplancurriculars) {
		this.detalleprerequisitoplancurriculars = detalleprerequisitoplancurriculars;
	}
	
}